home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 1998 November / IRIX 6.5.2 Base Documentation November 1998.img / usr / share / catman / p_man / cat3c / clock.z / clock
Text File  |  1998-10-20  |  2KB  |  67 lines

  1.  
  2.  
  3.  
  4. CCCCLLLLOOOOCCCCKKKK((((3333CCCC))))                                                            CCCCLLLLOOOOCCCCKKKK((((3333CCCC))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      clock - report CPU time used
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      ####iiiinnnncccclllluuuuddddeeee <<<<ttttiiiimmmmeeee....hhhh>>>>
  13.  
  14.      cccclllloooocccckkkk____tttt cccclllloooocccckkkk ((((vvvvooooiiiidddd))));;;;
  15.  
  16. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  17.      _c_l_o_c_k returns the amount of CPU time used since the first call to _c_l_o_c_k.
  18.      The unit time of clock (microseconds) is indicated in the macro
  19.      CLOCKS_PER_SEC found in the file <_t_i_m_e._h>.  The time reported is the sum
  20.      of the user and system times of the calling process and its terminated
  21.      child processes for which it has executed _w_a_i_t(2), _p_c_l_o_s_e(3S), or
  22.      _s_y_s_t_e_m(3S).
  23.  
  24.      The resolution of the clock is 10 milliseconds on IRIS workstations.
  25.  
  26. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  27.      times(2), wait(2), popen(3S), system(3S).
  28.  
  29. BBBBUUUUGGGGSSSS
  30.      The implementation of _c_l_o_c_k conflicts with the definition of the routine
  31.      found in the ANSI C Standard.  The discrepancy will be transparent,
  32.      however, so long as programs which adhere to that Standard use the
  33.      difference in two invocations of _c_l_o_c_k for timing information, as
  34.      recommended by the Standard.
  35.  
  36.      The value returned by _c_l_o_c_k is defined in microseconds for compatibility
  37.      with systems that have CPU clocks with much higher resolution.  Because
  38.      of this, the value returned will wrap around after accumulating only 2147
  39.      seconds of CPU time (about 36 minutes).
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.